<!DOCTYPE HTML>
<html>

<head>
      <title>售后列表</title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <link href="../../../assets/css/dpl-min.css" rel="stylesheet" type="text/css" />
      <link href="../../../assets/css/bui-min.css" rel="stylesheet" type="text/css" />
      <link href="../../../assets/css/page-min.css" rel="stylesheet" type="text/css" />
      <link href="../../../assets/css/jx-style.css" rel="stylesheet" type="text/css" />
      <link href="../../../assets/css/prettify.css" rel="stylesheet" type="text/css" />
      <link href="../../../assets/css/my-style.css" rel="stylesheet" type="text/css" />
</head>

<body class="dark-theme">
      <div class="container">
            <div class="detail-page">
                  <div class="detail-page-title">
                        <h4>售后列表</h4>
                  </div>
                  <div class="jx-search-container">
                  <form id="J_Form" class="jx-form form-horizontal jx-form-thin" method="post">
                     <div class="row ">
                        <div class="control-group span7">
                              <label class="control-label">关联订单号：</label>
                              <div class="controls">
                                    <input type="text" class=" control-text" id="orderName">
                              </div>
                        </div>
                        <div class="control-group span11">
                              <label class="control-label">申请时间 ：</label>
                              <div class="controls">
                                    <input class="calendar calendar-time" type="text"  name="startTime" id="startTime"><span> &nbsp;-&nbsp; </span>
                                    <input class="calendar calendar-time" type="text"  name="endTime" id="endTime">
                              </div>
                        </div>
                        <div class="control-group span7">
                              <label class="control-label">售后编号：</label>
                              <div class="controls">
                                    <input type="text" class=" control-text" id="refundNum">
                              </div>
                        </div>
                        <div class="control-group span7">
                              <label class="control-label">售后方式：</label>
                              <div class="controls">
                                    <select id="refundStatus" name="refundStatus">
                                        <option value="0">仅退款</option>
                                        <option value="1">退货退款</option>
                                    </select>
                              </div>
                        </div>
                        <div class="control-group span2 pull-right">
                           <button type="submit" class="jx-btn btn-default">搜索</button>
                        </div>
                     </div>

                  </form>
               </div>
               <div id="tab"></div>
               <div id="panel" class="">
                        <div>
                            <div id="grid"></div>
                            <div></div>
                            <div></div>
                        </div>
                    </div>
            </div>
      </div>
      </div>

      <script type="text/javascript" src="../../../assets/js/jquery-1.8.1.min.js"></script>
      <script type="text/javascript" src="../../../assets/js/bui-min.js"></script>
      <script type="text/javascript" src="../../../assets/js/config-min.js"></script>
      <script type="text/javascript" src="../../../assets/js/admin.js"></script>

      <script type="text/javascript">
            BUI.use('common/page');
      </script>
      <!-- script start -->
      <script>
            BUI.use(['bui/grid', 'bui/data', 'bui/calendar', 'bui/tab', 'common/search'], function (Grid, Data, Calendar,
            Tab, Search) {
            var Grid = Grid,
                Store = Data.Store,
                columns = [{
                    title: '售后编号',
                    dataIndex: 'a',
                    elCls: 'center', //居中
                    width: 250
                }, {
                    title: '售后类型',
                    elCls: 'center',
                    dataIndex: 'b',
                    width: 150
                }, {
                    title: '售后状态',
                    elCls: 'center',
                    dataIndex: 'c',
                    width: 150
                }, {
                    title: '下单用户账号',
                    elCls: 'center',
                    dataIndex: 'd',
                    width: 150
                }, {
                    title: '商户',
                    elCls: 'center',
                    dataIndex: 'e',
                    width: 150
                }, {
                    title: '申请时间',
                    elCls: 'center',
                    dataIndex: 'f',
                    width: 150
                }, {
                    title: '操作',
                    dataIndex: 'g',
                    elCls: 'center',
                    width: 200,
                    renderer: function (value, obj) {
                        var editStr = Search.createLink({ //链接使用 此方式
                            id: 'edit' + obj.id,
                            title: '售后详情',
                            text: '[ 查看详情 ] ',
                            href: 'templates/order/refund-detail.html'
                        });
                        return editStr;
                    }
                }],
                data = [{
                    a: '326148525252',
                    b: '仅退款',
                    c: '待审核',
                    d: 'Aillian_wang',
                    e: '激想体育特卖号',
                    f: '2018-04-23 15:30：32',
                } ];
            var datepicker = new Calendar.DatePicker({
                trigger: '.calendar',
                autoRender: true
            });
            var store = new Store({ //初始化数据
                    data: data,
                    pageSize: 2 // 配置分页数目
                }),
                grid = new Grid.Grid({
                    render: '#grid',
                    elCls: 'small-bui-grid-table',
                    columns: columns,
                    bbar: {
                        // pagingBar:表明包含分页栏
                        pagingBar: true
                    },
                    store: store
                }),
                tab = new Tab.TabPanel({
                    render: '#tab',
                    elCls: 'nav-tabs',
                    panelContainer: '#panel', //如果内部有容器，那么会跟标签项一一对应，如果没有会自动生成
                    //                 selectedEvent : 'mouseenter',//默认为click,可以更改事件
                    autoRender: true,
                    children: [{
                        id: '0',
                        title: '全部',
                        value: '2',
                    }, {
                        id: '1',
                        title: '待审核',
                        value: '1',
                    }, {
                        id: '2',
                        title: '待退货',
                        value: '3',
                    }, {
                        id: '3',
                        title: '待退款',
                        value: '3',
                    }, {
                        id: '4',
                        title: '已完成',
                        value: '3',
                    }, {
                        id: '5',
                        title: '已拒绝',
                        value: '3',
                    }, {
                        id: '6',
                        title: '已撤销',
                        value: '3',
                    }]
                });
            var index = 0;
            tab.on('selectedchange', function (ev) {
                var item = ev.item;
            });

            tab.setSelected(tab.getItemAt(0));

            grid.render();
        });
      </script>
      <!-- script end -->

</body>

</html>